1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular to the efficient compilation of computer usable program code. Still more particularly, the present invention relates to a computer implemented method, apparatus, and computer usable program code for merging memory allocations into a single memory allocation to improve the performance of executable compiled computer usable program code.
2. Description of the Related Art
Today, optimizing data cache performance is important in order to increase the speed and performance of new data processing systems. Optimization of data cache performance is increasingly important because of memory latency in dynamic random access memory (DRAM).
DRAM is a type of physical memory used in most personal computers. The term dynamic indicates that the memory must be constantly refreshed or the data held in the memory will be lost. Random access memory is sometimes referred to as DRAM to distinguish random access memory from static random access memory (SRAM). SRAM is faster and less volatile than DRAM, but it requires more power and is more expensive.
Much work in optimizing computer programs for use with dynamic random access memory has been focused on two types of data locality optimizations. One data locality optimization technique involves use of code transformations, such as a loop transformation or a loop interchange to exploit spatial data locality. In a code transformation, code is passed through a compiler to form a second form of code that is executed in the data processing system. Another type of optimization involves data layout transformation. In this type of optimization, data arrays are padded and the data array data structures are reordered in order to exploit data re-use. Both of these optimization techniques are particularly effective in the domain of scientific computing because, in scientific computing, programs operate extensively on arrays.
However, many modern applications make extensive use of pointers to store data using low-level programming languages that support such pointers, such as C and C++. The pointer-intensive programs represent a difficult challenge for modern computer architectures and memory hierarchies. Typical pointer-based heap allocated data tend to have less regular access patterns, which results in a worse reference locality than an array.